package com.info.zhiduoduo.repository.mapper.maker;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.dto.maker.MakerAnnualCheckDto;
import com.info.zhiduoduo.repository.entity.maker.MakerAnnualCheck;

import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 创客年度汇算清缴记录 Mapper 接口
 * </p>
 *
 * @author bob
 * @since 2019-12-26
 */
public interface MakerAnnualCheckMapper extends BaseMapper<MakerAnnualCheck> {

	@Select(" select mac.*,ms.username,ms.studionickname,sm.managername " +
			" from zdd_maker_annual_check mac " +
			" join zdd_maker_studio ms on ms.userid = mac.userid " +
			" left join zdd_system_manager sm on sm.managerid = mac.managerid " +
			" where mac.userid = #{userid} " +
			" order by mac.id desc")
	List<MakerAnnualCheckDto> getMakerAnnualCheckList(int userid);
}
